/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.web.session;

import java.io.Serializable;
import queenb.net.entitybean.Login;
import queenb.net.entitybean.Right;
import queenb.web.controller.QueenbController;
import queenb.web.util.SessionProvider;

/**
 *
 * @author thanhct
 */
public class LoginSession implements Serializable {

    private Login login;
    private boolean logged;
    private Right right;

    public LoginSession() {
        System.out.println("--LoginSession-----");
    }

    //End 4-11-2010 truong
    /**
     * @return the login
     */
    public boolean checkPermission(String s) {
        if (s.equals("a")) {
            return true;
        } else {
            return false;
        }
    }

    public Login getLogin() {
        SessionProvider.setSessionMapValue("login", login);

      
        return login;
    }

    /**
     * @param login the login to set
     */
    public void setLogin(Login login) {
        this.login = login;
    }

    /**
     * @return the logged
     */
    public boolean isLogged() {
        return logged;
    }

    /**
     * @param logged the logged to set
     */
    public void setLogged(boolean logged) {
        this.logged = logged;
    }

    /**
     * @return the right
     */
    public Right getRight() {
        return right;
    }

    /**
     * @param right the right to set
     */
    public void setRight(Right right) {
        this.right = right;
    }
}
